import { defineStore } from 'pinia'
import { ref, computed } from 'vue'

export const useNavStore = defineStore('nav', () => {
    const navList = ref([])

    const normalNavList = computed(() => {
        return navList.value.filter(item => item.type === 'normal')
    })

    function setNavList(list) {
        navList.value = list
    }

    return { navList, normalNavList, setNavList }
})